package com.ruoyi.human.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.human.mapper.TrialDataRecordHistoryMapper;
import com.ruoyi.human.domain.TrialDataRecordHistory;
import com.ruoyi.human.service.ITrialDataRecordHistoryService;

/**
 * 实验数据记录历史Service业务层处理
 * 
 * @author hdh
 * @date 2025-01-16
 */
@Service
public class TrialDataRecordHistoryServiceImpl implements ITrialDataRecordHistoryService 
{
    @Autowired
    private TrialDataRecordHistoryMapper trialDataRecordHistoryMapper;

    /**
     * 查询实验数据记录历史
     * 
     * @param historyId 实验数据记录历史主键
     * @return 实验数据记录历史
     */
    @Override
    public TrialDataRecordHistory selectTrialDataRecordHistoryByHistoryId(Long historyId)
    {
        return trialDataRecordHistoryMapper.selectTrialDataRecordHistoryByHistoryId(historyId);
    }
    @Override
    public List<TrialDataRecordHistory> selectTrialDataRecordHistoryByDataId(Long dataId){
        return trialDataRecordHistoryMapper.selectTrialDataRecordHistoryByDataId(dataId);
    }
    /**
     * 查询实验数据记录历史列表
     * 
     * @param trialDataRecordHistory 实验数据记录历史
     * @return 实验数据记录历史
     */
    @Override
    public List<TrialDataRecordHistory> selectTrialDataRecordHistoryList(TrialDataRecordHistory trialDataRecordHistory)
    {
        return trialDataRecordHistoryMapper.selectTrialDataRecordHistoryList(trialDataRecordHistory);
    }

    /**
     * 新增实验数据记录历史
     * 
     * @param trialDataRecordHistory 实验数据记录历史
     * @return 结果
     */
    @Override
    public int insertTrialDataRecordHistory(TrialDataRecordHistory trialDataRecordHistory)
    {
        return trialDataRecordHistoryMapper.insertTrialDataRecordHistory(trialDataRecordHistory);
    }

    /**
     * 修改实验数据记录历史
     * 
     * @param trialDataRecordHistory 实验数据记录历史
     * @return 结果
     */
    @Override
    public int updateTrialDataRecordHistory(TrialDataRecordHistory trialDataRecordHistory)
    {
        return trialDataRecordHistoryMapper.updateTrialDataRecordHistory(trialDataRecordHistory);
    }

    /**
     * 批量删除实验数据记录历史
     * 
     * @param historyIds 需要删除的实验数据记录历史主键
     * @return 结果
     */
    @Override
    public int deleteTrialDataRecordHistoryByHistoryIds(Long[] historyIds)
    {
        return trialDataRecordHistoryMapper.deleteTrialDataRecordHistoryByHistoryIds(historyIds);
    }

    /**
     * 删除实验数据记录历史信息
     * 
     * @param historyId 实验数据记录历史主键
     * @return 结果
     */
    @Override
    public int deleteTrialDataRecordHistoryByHistoryId(Long historyId)
    {
        return trialDataRecordHistoryMapper.deleteTrialDataRecordHistoryByHistoryId(historyId);
    }
}
